package com.yeban.bams.server.serversocket;

import java.io.Serializable;

/**
 * @Desc 服务端响应对象
 * @Author yeban
 * @Date 2025/11/7
 */
public class ResponseTO implements Serializable {

    private boolean success;    // 执行是否成功
    private Object data;        // 返回数据结果（单个对象）
    private String message;     // 提示 失败/成功 信息

    public ResponseTO() {
    }

    public ResponseTO(boolean success, Object data, String message) {
        this.success = success;
        this.data = data;
        this.message = message;
    }

    /**
     * 获取
     * @return success
     */
    public boolean isSuccess() {
        return success;
    }

    /**
     * 设置
     * @param success
     */
    public void setSuccess(boolean success) {
        this.success = success;
    }

    /**
     * 获取
     * @return data
     */
    public Object getData() {
        return data;
    }

    /**
     * 设置
     * @param data
     */
    public void setData(Object data) {
        this.data = data;
    }

    /**
     * 获取
     * @return message
     */
    public String getMessage() {
        return message;
    }

    /**
     * 设置
     * @param message
     */
    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "ResponseTO{" +
                "success=" + success +
                ", data=" + data +
                ", message='" + message + '\'' +
                '}';
    }
}
